qs('#logout').addEventListener('click', function (e) {
    e.preventDefault()
    layer.confirm('你确定要退出登录吗？', {icon: 3}, function(){
        layer.msg('即将退出', {icon: 1,time:2000},function(){
            localStorage.removeItem('token')
            location.href='../login.html'
        })
      }, function(){
        layer.msg('已取消退出')
      })
})
axios.get('/dashboard')
.then(function ({data:{data}}) {
  
    qs('#salary').innerHTML=data.overview.salary
    qs('#student_count').innerHTML=data.overview.student_count
    qs('#age').innerHTML=data.overview.age
    qs('#group_count').innerHTML=data.overview.group_count

})
.catch(function (error) {

  // location.href='../login.html'
})

